package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.RentPaymentdetailMapper;
import com.rzl.expense.expense.domain.RentPaymentdetail;
import com.rzl.expense.expense.service.IRentPaymentdetailService;

/**
 * 房租费缴费明细Service业务层处理
 * 
 * @author expense
 * @date 2024-11-27
 */
@Service
public class RentPaymentdetailServiceImpl implements IRentPaymentdetailService 
{
    @Autowired
    private RentPaymentdetailMapper rentPaymentdetailMapper;

    /**
     * 查询房租费缴费明细
     * 
     * @param paymentdetailId 房租费缴费明细主键
     * @return 房租费缴费明细
     */
    @Override
    public RentPaymentdetail selectRentPaymentdetailByPaymentdetailId(String paymentdetailId)
    {
        return rentPaymentdetailMapper.selectRentPaymentdetailByPaymentdetailId(paymentdetailId);
    }

    /**
     * 查询房租费缴费明细列表
     * 
     * @param rentPaymentdetail 房租费缴费明细
     * @return 房租费缴费明细
     */
    @Override
    public List<RentPaymentdetail> selectRentPaymentdetailList(RentPaymentdetail rentPaymentdetail)
    {
        return rentPaymentdetailMapper.selectRentPaymentdetailList(rentPaymentdetail);
    }

    /**
     * 新增房租费缴费明细
     * 
     * @param rentPaymentdetail 房租费缴费明细
     * @return 结果
     */
    @Override
    public int insertRentPaymentdetail(RentPaymentdetail rentPaymentdetail)
    {
        rentPaymentdetail.setCreateTime(DateUtils.getNowDate());
        return rentPaymentdetailMapper.insertRentPaymentdetail(rentPaymentdetail);
    }

    /**
     * 修改房租费缴费明细
     * 
     * @param rentPaymentdetail 房租费缴费明细
     * @return 结果
     */
    @Override
    public int updateRentPaymentdetail(RentPaymentdetail rentPaymentdetail)
    {
        rentPaymentdetail.setUpdateTime(DateUtils.getNowDate());
        return rentPaymentdetailMapper.updateRentPaymentdetail(rentPaymentdetail);
    }

    /**
     * 批量删除房租费缴费明细
     * 
     * @param paymentdetailIds 需要删除的房租费缴费明细主键
     * @return 结果
     */
    @Override
    public int deleteRentPaymentdetailByPaymentdetailIds(String[] paymentdetailIds)
    {
        return rentPaymentdetailMapper.deleteRentPaymentdetailByPaymentdetailIds(paymentdetailIds);
    }

    /**
     * 删除房租费缴费明细信息
     * 
     * @param paymentdetailId 房租费缴费明细主键
     * @return 结果
     */
    @Override
    public int deleteRentPaymentdetail()
    {
        return rentPaymentdetailMapper.deleteRentPaymentdetail();
    }




    @Override
    public void batchRentPaymentdetail(List<RentPaymentdetail> list)
    {

         rentPaymentdetailMapper.batchRentPaymentdetail(list);
    }


}
